package builder.example;

import javax.swing.*;
import java.awt.*;

/**
 * @author Chen Guang
 * @date 2019/4/9 0009 上午 11:06
 */
public class Test {
    public static void main(String[] args) {
        PersonDirector director;
        PersonThinBuilder thinBuilder = new PersonThinBuilder();
        PersonFatBuilder fatBuilder = new PersonFatBuilder();

        System.out.println("瘦猴凯：");

        director = new PersonDirector(thinBuilder);
        director.createPerson();

        System.out.println("肥猪王：");
        director = new PersonDirector(fatBuilder);
        director.createPerson();
    }
}
